package com.fengxu.springcloud.service;

import com.fengxu.springcloud.doman.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "seata-storage-service")
@Service
public interface StorageService {

    // 扣除库存的方法
    @PostMapping("/storage/dec")
    CommonResult decrease(@RequestParam("productId") Long productId, @RequestParam("count")Integer count);

}
